<table border="0" style="float:right;">
    <tr>
        <form action="" method="post">
          <td>
            <?php echo _mytranslator('Search User');?> : &nbsp;
           </td>
        <td border="0">
            <input type="text" name="searchkey" value="<?php echo $this->searchkey;?>"> 
            </td>
            </form>
    </tr>
    
</table>
<table> <tr>
    <td><a href="/admin/user/create" class="blue-button"><?php echo _mytranslator('Create User')?></a></td>
    
  </tr>  </table>
<table width="100%" border="0" class="userlist noramaltable">
 
 <thead>
  <tr>
    <td><?php echo _mytranslator('S no.');?></td>
    <td><?php echo _mytranslator('Username');?></td>
    <td><?php echo _mytranslator('Email');?></td>
    <td><?php echo _mytranslator('Status');?></td>
    <td><?php echo _mytranslator('Role');?></td>
    <td><?php echo _mytranslator('Actions');?></td>
  </tr>
 </thead>
 
  <?php foreach($this->users as $key=>$user):?>
 <tbody>
  <tr >
    <td><?php echo $key+1;?></td>
    <td><?php echo $user['username'];?></td>
    <td><?php echo $user['user_email'];?></td>
    <td><?php echo $user['status'];?></td>
    <td><?php echo $user['role_name'];?></td>
    <td><a href="<?php echo $this->baseUrl('/admin/user/edit/id/'.$user[id]);?><?php if($this->page){echo '/page/'.$this->page;}else{echo '';}?>">Edit</a>  
        <a href="<?php echo $this->baseUrl('/admin/user/delete/id/'.$user['id']);?><?php if($this->page){echo '/page/'.$this->page;}else{echo '';}?>" class="delete">Delete</a></td>
  </tr>
  </tbody>
 <?php endforeach;?> 
  <?php if($this->pagination()):?>
  <tr>
    <td colspan="4"><?php echo $this->pagination();?></td>
   
  </tr>
  <?php endif;?>
</table>
<script>
$(document).ready(function(){
    
        $(".delete").click(function(e){
            e.preventDefault();
            var url = $(this).attr('href');
            setDeleteDialog(url,'<?php echo _mytranslator("Do you want to delete this user?") ?>');
            
        })
    
    
})

</script>